<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>IdleSpace2</title>
  <base href="/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
  <!-- <link href="https://fonts.googleapis.com/css?family=Fira+Code&display=swap" rel="stylesheet"> -->
  <link href="https://fonts.googleapis.com/css?family=Roboto+Mono&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">

  <link href="" rel="stylesheet" id="gameTheme">
  <link href="" rel="stylesheet" id="scrollTheme">

  <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-62555946-2"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-62555946-2');
</script>
<script type="text/javascript" src="https://download.playfab.com/PlayFabClientApi.js"></script>
<script src="https://cdn1.kongregate.com/javascripts/kongregate_api.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
    integrity="sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E="
    crossorigin="anonymous"></script>

    <script>
     const url =
      window.location !== window.parent.location
        ? document.referrer
        : document.location.href;

      preventScroll = function () {
        if (!url.includes("kongregate")){
          return false;
        }
        
        setTimeout(function () {
          $('.drag-list,.inner-content').on('DOMMouseScroll mousewheel', function (ev) {
            body = $('body')[0]
            var $this = $(this),
              scrollTop = this.scrollTop,
              scrollHeight = this.scrollHeight,
              height = $this.innerHeight(),
              delta = (ev.type == 'DOMMouseScroll' ?
                ev.originalEvent.detail * -40 :
                ev.originalEvent.wheelDelta),
              up = delta > 0;
            var prevent = function () {
              ev.stopPropagation();
              ev.preventDefault();
              ev.returnValue = false;
              return false;
            }

            if($this.hasClass("drag-list")){
              //console.log(delta)
              $this.scrollTop(scrollTop -delta );
              return false;
            }else{
            if (!up && -delta > scrollHeight - height - scrollTop) {
              // Scrolling down, but this will take us past the bottom.
              $this.scrollTop(scrollHeight);
              return prevent();
            } else if (up && delta > scrollTop) {
              // Scrolling up, but this will take us past the top.
              $this.scrollTop(0);
              return prevent();
            }
          }
          }
          )
        }
          , 0)
      };
    </script>
    <style>
      body {
        margin: 0;
      }
      .flexCont {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        background-color: #252423;
      }
      .loaderC {
        text-align: center;
        max-width: 50%;
        color:#E4E4D6
      }
    </style>
</head>
<body>
  <app-root>
    <div id="preload" class="flexCont">
      <div class="loaderC">
        <h1>
          Idle Space 2
        </h1>
        <p>Loading<br />Optimized for latest Chromium and Firefox</p>
      </div>
    </div>
  </app-root>
</body>
</html>
